package com.rf.richfitwheel.workflow.service;

import com.rf.richfitwheel.admin.sys.vo.UserVO;
import com.rf.richfitwheel.common.utils.PageUtils;
import com.rf.richfitwheel.common.utils.TreeUtils;
import com.rf.richfitwheel.workflow.model.WfProcessFolder;

import java.util.List;
import java.util.Map;

/**
 * 流程目录表
 *
 * @author zhanglu
 * @email zhanglu2@cnpc.com.cn
 * @date 2021-07-20 09:01:22
 */
public interface WfProcessFolderService {

    PageUtils queryPage(Map<String, Object> params);

    void save(WfProcessFolder wfProcessFolder);

    void updateById(WfProcessFolder wfProcessFolder);

    void removeByIds(List<String> asList);

    WfProcessFolder getById(String id);

    List<TreeUtils> getTreeForWfProcessFolder(String id) throws Exception;

    void addWfProcessFolder(WfProcessFolder wfProcessFolder, UserVO user);

    void deleteById(String id, UserVO user);

    void updateWfProcessFolder(WfProcessFolder wfProcessFolder, UserVO user);

    List<WfProcessFolder> selectListByFolderType(String folderType);

    List<TreeUtils> treeListByIdForWfModelExtend(String id) throws Exception;

    WfProcessFolder selectByFolderCode(String folderCode);

    List<WfProcessFolder> selectListByFolderTypes(List<String> folderTypes);

    List<WfProcessFolder> selectListByModuleType(String moduleType);
    
    List<TreeUtils> getTreeForWfProcessFolderForModuleType(String parentId, String moduleType) throws Exception;

    /**
     * 获取按模块组织的流程定义
     * @return 流程目录定义
     */
    Map<String, List<WfProcessFolder>> getWfProcessFolderForModuleType();
}

